<%--
  Created by IntelliJ IDEA.
  User: 61003
  Date: 2023/3/2
  Time: 16:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
  <title>用户更新</title>
  <link rel="stylesheet" href="/css/bootstrap.min.css">
  <link rel="stylesheet" href="/css/bootstrap-theme.min.css">
  <script src="/js/jquery-1.12.4.min.js"></script>
  <script src="/js/bootstrap.min.js"></script>
  <style>
    body{
      background-color: #9acfea;
    }
    *{
      font-family: "楷体";
      font-size: 2.0rem;
    }
    input{
      width: 300px;
    }
    .table1{
      text-align:center;
      border:1px solid;
      height:340px;
      width:540px;
      background-color: skyblue;
    }
    #biao{
      background-color: aliceblue;
      text-align:center;
      border:1px solid;
      height:300px;
      width:500px;
    }
  </style>
</head>
<body>
<div style="display: block;height: 80px">
</div>

<form action="/users" method="post">
  <table  align="center" class="table1">
    <tr>
      <td align="center">
        <table  align="center" id="biao">
          <caption>${requestScope.user.username} 正在${requestScope.user.user_id eq null?"注册": "更新"}</caption>
          <tr>
            <td>
              <input type="hidden" name="user_id"value="${user.user_id}">
            </td>
            <td>
              <c:if test="${requestScope.user.user_id != null}">
                <div  class="form-group">
                  <label>用户ID</label>
                  <span>${user.user_id}</span>
                </div>
              </c:if>
            </td>
          </tr>
          <tr>
            <td align="right"><label>用户名:</label></td>
            <td><input name="username"value="${user.username}"></td>
          </tr>
          <tr>
            <td align="right"><label>password:</label></td>
            <td><input name="password" value="${user.password}"></td>
          </tr>
          <tr align="center">
            <td colspan="2"><button>提交</button></td>
          </tr>
        </table>
      </td>
    </tr>
    <tr height=40px></tr>
  </table>

</form>
<c:if test="${requestScope.error != null}">
  <div style="color: red">${requestScope.error}</div>
</c:if>
</body>
</html>

